<template>
  <!-- 订单审核弹窗 -->
  <div class="order-audit-form">
    <el-dialog :model-value="modelValue" title="订单审核" width="40%" @close="handleCancel">
      <el-form :model="form">
        <el-form-item prop="status" label="订单审核">
          <el-radio-group v-model="form.status">
            <el-radio :label="3">通过</el-radio>
            <el-radio :label="6">拒绝</el-radio>
            <el-radio :label="9">拒绝并退款</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item prop="remarks" label="备注"> <el-input v-model="form.remarks" maxlength="100" placeholder="请输入内容"
            show-word-limit :rows="4" type="textarea" /></el-form-item>
      </el-form>
      <template #footer>
        <el-button @click="handleCancel">取消</el-button>
        <el-button type="primary" @click="clickConfirm">确定</el-button>
      </template>
    </el-dialog>
  </div>
</template>

<script setup>
const props = defineProps({
  modelValue: {
    type: Boolean,
    default: false,
  },
})
const form = reactive({
  status: 0,
  remarks: ''
})

const emits = defineEmits(["close", "confirm", "update:modelValue", "open"]);
const handleCancel = () => {
  emits('update:modelValue', false)
  emits('close')
}
const clickConfirm = () => {
  emits('confirm')
}
</script>

<style lang="less" scoped></style>